function cost1 = costfunction_constrain_slack(pos,rss0,n, pix, rss, fillvalue, pixnumber, A, b, diff)
d0 = sqrt(sum((pos * ones(1, pixnumber) - pix) .^ 2));
r0 = -(rss0 + 10 * n * log10(d0 / 100 * 1.5));
r=r0-rss;
cost1 = sum(abs(r)) + 100*sum((A * pos - b)  .* (A * pos - b >= 0));%+ 1e-2 * sum((A * pos - b) .* (diff .^ 3) .* (A * pos - b >= 0));

end

